package com.coocaa.ops.admin.v1.audit.converter;


import com.coocaa.ops.common.core.biz.audit.entity.AuditTaskInfoEntity;

/**
 * @author bijiahao
 * @date : 2018/6/16.
 * @description
 */
public final class AuditTaskConverter {
    /**
     * 获取打开任务信息
     * @param taskName
     * @param resourceId
     * @param resourceVersion
     * @param resourceType
     * @param source
     * @param priority
     * @return
     */
    public static AuditTaskInfoEntity convertOpenTaskInfo(String taskName, Integer resourceId, Integer resourceVersion, String resourceType, String source, Integer priority){
        AuditTaskInfoEntity entity = new AuditTaskInfoEntity();
        entity.setTaskName(taskName);
        entity.setResourceId(resourceId);
        entity.setResourceVersion(resourceVersion);
        entity.setResourceType(resourceType);
        entity.setSource(source);
        entity.setPriority(priority);
        entity.setFlag(1);
        return entity;
    }

}
